import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import Login from '@/components/login/Login'
import Home from '@/components/home/Home'
import Trans from '@/components/trans/Trans'
import See from "../components/see/See";
import ReviewBlock from "../components/reviewblock/ReviewBlock";
import WordList from "../components/word_list/WordList";
import WordDetail from "../components/worddetail/WordDetail";
import MyReview from "../components/myreview/MyReview";
import StaticView from "../components/staticview/StaticView";
import Register from "../components/register/Register";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login,
      meta: {
        keepAlive: true
      }
    },
    {
      path: '/home',
      name: '首页',
      component: Home,
      meta: {
        keepAlive: false
      }
    },
    {
      path: '/fanyi',
      name: '翻译页',
      component: Trans
    },
    {
      path: '/see',
      name: '查看页',
      component: See,
      meta: {
        keepAlive: true
      },
      redirect: '/see/wordlist/',
      // component: See,
      children:[{
          path: '/see/wordlist/',
          component: WordList,
          meta: {
            keepAlive: true
          }
        },
        {
          path: '/see/reviewblock',
          component: ReviewBlock,
          meta: {
            keepAlive: true
          }
        }
      ]
    },
    {
      name: '单词详情页',
      path: '/worddetail',
      component: WordDetail,
      meta: {
        keepAlive: false
      }
    },
    {
      name: '背诵页',
      path: '/myreview',
      component: MyReview,
      meta: {
        keepAlive: true
      }
    },
    {
      name: '统计页',
      path: '/static',
      component: StaticView
    },
    {
      name: '註冊頁',
      path: '/register',
      component: Register
    }
  ],
})
